package cn.wolfcode.order.query;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

import java.io.Serializable;

/**
 * Created by Chris on 2018/1/3.
 */
@Getter@Setter
@NoArgsConstructor
@AllArgsConstructor
public class QueryObject implements Serializable {
    private int currentPage =1;
    private int pageSize = 8;

    public boolean hasLength(String str){
        return str!=null && !"".equals(str.trim());
    }

    public String empty2null(String str) {
        return hasLength(str) ? str : null;
    }


}
